/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.pkdl.tables;

import java.util.Vector;

import javax.swing.table.DefaultTableModel;

public class MyTableModel extends DefaultTableModel {

	private boolean isEdit;

	public MyTableModel(Vector data, Vector columnNames, boolean type) {
		super(data, columnNames);
		this.isEdit = type;
	}

	/** Override this method to return true if cell is editable */
	@Override
	public boolean isCellEditable(int row, int column) {
		if (!this.isEdit)// false -> disable Edit
		{
			return false;
		}
		return true;// true -> enable edit
	}

}
